package com.jl.jlapp.mvp.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.TextView;
import android.widget.Toast;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.bumptech.glide.Glide;
import com.bumptech.glide.RequestBuilder;
import com.bumptech.glide.RequestManager;
import com.bumptech.glide.request.RequestOptions;
import com.jl.jlapp.R;
import com.jl.jlapp.utils.Tools;

public class UnderLinePayResultActivity
  extends Activity
{
  @BindView(R.id.pic_1)
  ImageView imgPic1;
  @BindView(R.id.pic_2)
  ImageView imgPic2;
  String pic1 = "";
  String pic2 = "";
  int picNum = 0;
  @BindView(R.id.rb_left)
  RadioButton returnHomePage;
  @BindView(R.id.rb_right)
  RadioButton seeOrder;
  @BindView(R.id.tv_result)
  TextView tvResult;
  @BindView(R.id.tv_succsess_num)
  TextView tvSuccessNum;
  
  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(R.layout.activity_result_pay_underline);
    ButterKnife.bind(this);
    Tools.finishAll();
    Intent intent = getIntent();
    String str = intent.getStringExtra("orderNo");
    final int i = intent.getIntExtra("orderId", -1);
    int j = intent.getIntExtra("page", 0);
    this.picNum = intent.getIntExtra("picNum", -1);
    if (this.picNum == 1)
    {
      this.pic1 = intent.getStringExtra("pic1");
      if ("".equals(this.pic1)) {
        Toast.makeText(this, "页面传值错误", Toast.LENGTH_SHORT).show();
      }
      if ((str == null) || (str == "") || (i == -1) || (j != 1)) {
      }
      this.tvResult.setText("提交成功");
      this.tvSuccessNum.setText("您的订单(订单号:" + str + ")已提交成功,正在审核。");
      if ((this.picNum != 1) || ("".equals(this.pic1))) {
      }
      this.imgPic2.setVisibility(View.GONE);
      Glide.with(this).asBitmap().apply(new RequestOptions().placeholder(R.drawable.img_noimg_xs).error(R.drawable.img_lose_xs)).load("http://117.158.178.202:8001/JLMIS/" + this.pic1).into(this.imgPic1);
    }else
    {
      this.imgPic1.setOnClickListener(new OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          Intent photoIntent = new Intent(UnderLinePayResultActivity.this, PhotoViewActivity.class);
          photoIntent.putExtra("picUrl", UnderLinePayResultActivity.this.pic1);
          UnderLinePayResultActivity.this.startActivity(photoIntent);
        }
      });
      this.imgPic2.setOnClickListener(new OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          Intent photoIntent = new Intent(UnderLinePayResultActivity.this, PhotoViewActivity.class);
          photoIntent.putExtra("picUrl", UnderLinePayResultActivity.this.pic2);
          UnderLinePayResultActivity.this.startActivity(photoIntent);
        }
      });
      this.returnHomePage.setOnClickListener(new OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          Intent photoIntent  = new Intent(UnderLinePayResultActivity.this, BaseActivity.class);
          photoIntent.putExtra("shouldReplaceFragment", 0);
          UnderLinePayResultActivity.this.startActivity(photoIntent);
        }
      });
      this.seeOrder.setOnClickListener(new OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          Intent photoIntent = new Intent(UnderLinePayResultActivity.this, OrderDetailActivity.class);
          photoIntent.putExtra("orderId", i);
          UnderLinePayResultActivity.this.startActivity(photoIntent);
        }
      });
      this.pic1 = intent.getStringExtra("pic1");
      this.pic2 = intent.getStringExtra("pic2");
      if ((!"".equals(this.pic1)) && (!"".equals(this.pic2))) {
        Toast.makeText(this, "页面传值错误", Toast.LENGTH_SHORT).show();
      }
      if ((this.picNum == 2) && (!"".equals(this.pic1)) && (!"".equals(this.pic2)))
      {
        this.imgPic2.setVisibility(View.VISIBLE);
        Glide.with(this).asBitmap().apply(new RequestOptions().placeholder(R.drawable.img_noimg_xs).error(R.drawable.img_lose_xs)).load("http://117.158.178.202:8001/JLMIS/" + this.pic1).into(this.imgPic1);
        Glide.with(this).asBitmap().apply(new RequestOptions().placeholder(R.drawable.img_noimg_xs).error(R.drawable.img_lose_xs)).load("http://117.158.178.202:8001/JLMIS/" + this.pic2).into(this.imgPic2);
      }else {
        Toast.makeText(this, "页面传值错误", Toast.LENGTH_SHORT).show();
      }
    }
  }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/mvp/activity/UnderLinePayResultActivity.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */